<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        .test{
            display: flex;
            width: 50%;
            justify-content: center;
        }
        .test2{
            display: flex;
            width: 50%;
            justify-content: center;
        }
       .test div{
            margin-left: 20px;
            width: 100px;
            line-height: 400px;
           border: red 1px solid;
           text-align: center;
        }
        .test2 div{
            margin-top: 30px;
            margin-left: 20px;
            width: 200px;
            line-height: 100px;
            border: red 1px solid;
            text-align: center;
        }
    </style>
</head>
<body>
<div class="test">
<div>11111</div>
<div>11111</div>
<div>11111</div>
<div>11111</div>
</div>
<div class="test2" style="text-align: center">
    <div>1111</div>
</div>
<script>
     var sum = function (n){
         if(1 == n){
             return 1;
         }else{
             return n+sum(n-1)
         }
     }
     console.log(sum(6))
</script>
</body>
</html>